package com.cdivtc.management.dao;


import com.cdivtc.management.pojo.AchPatent;
import com.cdivtc.management.pojo.AchThesis;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

public interface AchThesisMapper  extends Mapper<AchThesis>, MySqlMapper<AchThesis> {
    //    校长查询为审核的成果
    @Select("SELECT *  from ach_thesis WHERE state = '2' ")
    public List<AchThesis> queryAchBySchool();
//退回   3通过  6 退回
    @Select("SELECT *  from ach_thesis WHERE(  state = '3' or  state = '6'  ) and grades >= 104 ")
    public List<AchThesis> queryAchBySchoolpass();

    //    院长审核院级
    @Select("SELECT *  from ach_thesis WHERE state = '1' and college = #{collage} and grades >= 103 ")
    public List<AchThesis> queryAchByCollage(String collage);//    院长审核院级

    @Select("SELECT *  from ach_thesis WHERE state != '0' and state !='1' and state !='4' and college = #{collage} and grades  >= 103 ")
    public List<AchThesis> queryAchByCollagepass(String collage);
//辅导员
    @Select("SELECT *  from ach_thesis WHERE state = '0' and clazz_id = #{clazz} and grades >=101 ")
    public List<AchThesis> queryAchByClazz(String clazz);

    @Select("SELECT *  from ach_thesis WHERE  state != '0'  and clazz_id = #{clazz} and grades >=101 ")
    public List<AchThesis> queryAchByClazzpass(String clazz);
    @Select("SELECT *  from ach_thesis WHERE uid=#{uid} and title like #{title}")
    public List<AchThesis> queryByAchTitleAndUid(@Param("uid") String uid, @Param("title") String title);
}